#ifndef QTEXTEDITORPLUS_H
#define QTEXTEDITORPLUS_H

#include <QTextEdit>
#include <QMimeData>
#include <QKeyEvent>
#include <QApplication>
#include <QClipboard>

class QTextEditorPlus : public QTextEdit
{
    Q_OBJECT
public:
    explicit QTextEditorPlus(QWidget *parent = nullptr);

protected:
    //重写插入函数实现图文混排粘贴
    void insertFromMimeData(const QMimeData *source) override;


private:
    QString extractTextFromHtml(const QString &htmlContent);
};

#endif // QTEXTEDITORPLUS_H
